#include <QCoreApplication>
#include <QDebug>
#include "DistributionBase.h"
#include "Normal_distribution.h"
#include "Uniform_distribution.h"
#include "Weibull_distribution.h"
#include "Exponential_distribution.h"

int main(int argc, char *argv[])
{
    DistributionBase*c_normal = new Normal_distribution();
    DistributionBase*c_uniform = new Uniform_distribution();
    DistributionBase*c_weibull = new Weibull_distribution();
    DistributionBase*c_exponential = new Exponential_distribution();

    c_normal->setDistribution_name("Normal"); //加双引号输出的是文字
    c_normal->setDistribution_code("No.1");
    c_normal->setDistribution_parameter_1(2);  //不加双引号的就是数字输入
    c_normal->setDistribution_parameter_2(0.01);
    c_normal->setSample_Number(10);

    c_uniform->setDistribution_name("Uniform");
    c_uniform->setDistribution_code("No.2");
    c_uniform->setDistribution_parameter_1(1);
    c_uniform->setDistribution_parameter_2(2);
    c_uniform->setSample_Number(10);

    c_weibull->setDistribution_name("Weibull");
    c_weibull->setDistribution_code("No.3");
    c_weibull->setDistribution_parameter_1(10);
    c_weibull->setDistribution_parameter_2(2);
    c_weibull->setSample_Number(10);

    c_exponential->setDistribution_name("Exponential");
    c_exponential->setDistribution_code("No.4");
    c_exponential->setDistribution_parameter_1(3);
    c_exponential->setSample_Number(10);

    qDebug() << c_normal->getDistribution_name()
             << c_normal->getDistribution_code();
    c_normal->get_mean_value();
    c_normal->get_deviation();
    c_normal->get_random_number();

    qDebug() <<endl<< c_uniform->getDistribution_name()
                   << c_uniform->getDistribution_code();
    c_uniform->get_mean_value();
    c_uniform->get_deviation();
    c_uniform->get_random_number();

    qDebug() <<endl<< c_weibull->getDistribution_name()
                   << c_weibull->getDistribution_code();
    c_weibull->get_mean_value();
    c_weibull->get_deviation();
    c_weibull->get_random_number();


    qDebug() <<endl<< c_exponential->getDistribution_name()
                   << c_exponential->getDistribution_code();
    c_exponential->get_mean_value();
    c_exponential->get_deviation();
    c_exponential->get_random_number();


    delete c_normal;
    delete c_uniform;
    delete c_weibull;
    delete c_exponential;
    return 0;
}
